<template>
  <div class="goodsreview" style="background-color: blueviolet;">
    <!-- -->
    <p v-for="(item, index) in reviewList" :key="index">
      {{ item.userName }}说：{{ item.review }}
    </p>
  </div>
</template>

<script setup>
import axios from 'axios'
import { ref } from 'vue'
import {useRoute} from 'vue-router'
const reviewList = ref([])
const route = useRoute()

axios({
  url: `http://localhost:3000/goodsList/${route.query.goodsid}`,
  method: 'get'
}).then((res) => {
  reviewList.value = res.data.reviews
})


</script>

<style lang="scss" scoped></style>